import ReportComp from "containers/data-center/report/report-list";
import FeeReportComp from "containers/data-center/fee-report/fee-report";
import FeeReportComp1 from "containers/data-center/fee-report/fee-report1";
import FeeReportComp2 from "containers/data-center/fee-report/fee-report2";
import TravelReportComp from "containers/data-center/report/travel-report/travel-report";
import TravelReportSettingComp from "containers/data-center/report/travel-report/travel-report-setting";
import ThirdReportComp from "containers/data-center/report/third-report/third-report";
import ReportDistributionComp from "containers/data-center/report-distribution/report-distribution";
import ReportDistributionDetailComp from "containers/data-center/report-distribution/permission-detail/report-distribution-permission-details.js";
import ReportDistributionPermissionComp from "containers/data-center/report-distribution/report-distribution-details";
import TravelReportFeeReportComp from "containers/data-center/report/travel-report/fee-report/fee-report";
import TravelReportFeeDetailReportComp from "containers/data-center/report/travel-report/fee-detail-report/fee-detail-report";
import PersonnelFeeReportComp from "containers/data-center/report/travel-report/personnel-fee-report/index";

//数据中心
const dataCenter = {
  key: 'data-center',
  icon: 'line-chart',
  subMenu: [
    //报表
    {
      key: 'report',
      url: '/main/data-center/report',
      components: ReportComp,
      parent: 'data-center',
      children: {

        //报表详情
        travelReport: {
          key: 'travel-report',
          url: '/main/data-center/report/travel-report/:id',
          components: TravelReportComp,
          parent: 'report',
        },
        //报表设置
        travelReportSetting: {
          key: 'travel-report-setting',
          url: '/main/data-center/report/travel-report-setting/:id',
          components: TravelReportSettingComp,
          parent: 'report',
        },
        // 费用分析报表
        travelReportFeeReport: {
          key: 'travel-report-fee-report',
          url: '/main/data-center/report/travel-report-fee-report/:id',
          components: TravelReportFeeReportComp,
          parent: 'report',
        },
        personnelFeeReport: {
          key: 'personnel-fee-report',
          url: '/main/data-center/report/personnel-fee-report/:id',
          components: PersonnelFeeReportComp,
          parent: 'report',
        },
        //规则明细报表
        TravelReportFeeDetailReport: {
          key: 'travel-report-fee-detail-report',
          url: '/main/data-center/report/travel-report-fee-detail-report/:id',
          components: TravelReportFeeDetailReportComp,
          parent: 'report',
        },
        //第三方报表
        thirdReport: {
          key: 'third-report',
          url: '/main/data-center/report/third-report/:url/:type',
          components: ThirdReportComp,
          parent: 'report',
        },
      },
    },
    //报表分配
    {
      key: 'data-report-distribution',
      url: '/main/data-center/data-report-distribution',
      components: ReportDistributionComp,
      parent: 'data-center',
      hasRole: ['ROLE_DATA_ADMIN'],
      children: {
        //权限分配
        reportDistributionPermission: {
          key: 'data-report-distribution-permission',
          url: '/main/data-center/data-report-distribution/data-report-distribution-permission/:id/:name',
          components: ReportDistributionPermissionComp,
          parent: 'data-report-distribution',
        },
        //权限详情
        reportDistributionPermissionDetail: {
          key: 'data-report-distribution-detail',
          url: '/main/data-center/data-report-distribution/data-report-distribution-permission/detail/:id/:permission_id/:permission_user',
          components: ReportDistributionDetailComp,
          parent: 'data-report-distribution-permission',
        },
      }
    },
    //费用分析报表
    //请不要删除
    {
      key: 'fee-report',
      newPermission: true,//启用了新权限，此菜单才显示
      url: '/main/data-center/fee-report',
      components: FeeReportComp,
      parent: 'data-center',
    },
    //请不要删除
    {
      key: 'fee-report-t',
      newPermission: true,//启用了新权限，此菜单才显示
      url: '/main/data-center/fee-report-t',
      components: FeeReportComp1,
      parent: 'data-center',
    },
    //请不要删除
    {
      key: 'fee-report-tt',
      newPermission: true,//启用了新权限，此菜单才显示
      url: '/main/data-center/fee-report-tt',
      components: FeeReportComp2,
      parent: 'data-center',
    },
  ]
};

export default dataCenter

